bug fix, should get created file properly now