Fix creating files, when passed from cmd line