diff --git a/file.hpp b/file.hpp
index bc5450f..9ad5213 100644
--- a/file.hpp
+++ b/file.hpp
@@ -10,39 +10,39 @@
  */
 class FileDescriptor
 {
-    private:
-        /** @brief File descriptor for the gpio input device */
-        int fd = -1;
+  private:
+    /** @brief File descriptor for the gpio input device */
+    int fd = -1;
 
-    public:
-        FileDescriptor() = delete;
-        FileDescriptor(const FileDescriptor&) = delete;
-        FileDescriptor& operator=(const FileDescriptor&) = delete;
-        FileDescriptor(FileDescriptor&&) = delete;
-        FileDescriptor& operator=(FileDescriptor&&) = delete;
+  public:
+    FileDescriptor() = delete;
+    FileDescriptor(const FileDescriptor&) = delete;
+    FileDescriptor& operator=(const FileDescriptor&) = delete;
+    FileDescriptor(FileDescriptor&&) = delete;
+    FileDescriptor& operator=(FileDescriptor&&) = delete;
 
-        /** @brief Saves File descriptor and uses it to do file operation
-         *
-         *  @param[in] fd - File descriptor
-         */
-        FileDescriptor(int fd) : fd(fd)
+    /** @brief Saves File descriptor and uses it to do file operation
+     *
+     *  @param[in] fd - File descriptor
+     */
+    FileDescriptor(int fd) : fd(fd)
+    {
+        // Nothing
+    }
+
+    ~FileDescriptor()
+    {
+        if (fd >= 0)
         {
-            // Nothing
+            close(fd);
         }
+    }
 
-        ~FileDescriptor()
-        {
-            if (fd >=0)
-            {
-                close(fd);
-            }
-        }
-
-        int operator()()
-        {
-            return fd;
-        }
+    int operator()()
+    {
+        return fd;
+    }
 };
 
 } // namespace occ
-} // namespace open-power
+} // namespace open_power
