add newline and full/current directory option
optimized __print function