added file selection dialog, fixed negative coordinates bug