Added invalid input & overwrite error handling!