Introduced FILE_FORMAT variable to rem
Move puppetdbPostgresEnv back to a function